home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
- From: Dan Pop <danpop@mail.cern.ch>
- Newsgroups: comp.lang.c
- Subject: Re: What does the -O option do???!!!
- Date: Wed, 7 Feb 1996 12:34:23 +0100
- Organization: CERN European Lab for Particle Physics
- Message-ID: <9602071134.AA13071@dxmint.cern.ch>
- References: <4ehger$cj9@mark.ucdavis.edu> <4emlsq$odt@airdmhor.gen.nz> <pronet01.34.003B9BB5@indirect.com>
- X-NNTP-Posting-Host: hpl3sn03.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
- X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
-
- pronet01@indirect.com (Mark Miller) writes:
-
- >It definitely is the optimizing compiler flag...
- >
- >Warning: if you DO use the "-O" make sure you know of the caveats
- >with certain compilers... Older versions of gcc/g++ did "evil" things
- >to code compiled with "-O"... The compiler attempts to do double
- >checks and reorganization of object code...
-
- No matter what gcc options you use for the production version of your
- software, if you use -Wall during development, -O is highly recommended,
- because it enables more warnings in -Wall, namely those about variables
- which are used before being initialized.
-
- >Hint: When you're done using a pointer (and it has not gone out of
- >scope), explicitly set it to NULL.. I have seen the optimized version
- >move addresses for a pointer variable that you have used "free" on..
-
- I can't parse the last statement.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-